﻿using BCCommon.Enums;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCEntity.MongoDB.PushMessage
{
    /// <summary>
    /// 推送消息信息
    /// </summary>
    public class PushMessageMongoEntity
    {
        /// <summary>
        /// kafka临时消息Id
        /// </summary>
        [BsonId]
        public string TemplateMessageId { get; set; }
        /// <summary>
        /// App类型
        /// </summary>
        [BsonElement("AppType")]
        public AppType AppType { get; set; }
        /// <summary>
        /// 推送接收者Id数组
        /// </summary>
        [BsonElement("UserIds")]
        public long[] UserIds { get; set; }
        /// <summary>
        /// 推送信息标题
        /// </summary>
        [BsonElement("Title")]
        public string Title { get; set; }
        /// <summary>
        /// 推送内容正文
        /// </summary>
        [BsonElement("Body")]
        public string Body { get; set; }
        /// <summary>
        /// 推送附带信息对象
        /// </summary>
        public string Obj { get; set; } = null;
        /// <summary>
        /// 顶部提醒框的类型
        /// </summary>
        [BsonElement("BarTypeId")]
        public int? BarTypeId { get; set; } = null;
        /// <summary>
        /// IOS音乐文件地址
        /// </summary>
        [BsonElement("IosMusic")]
        public string IosMusic { get; set; } = null;
        /// <summary>
        /// 消息创建时间
        /// </summary>
        [BsonDateTimeOptions(DateOnly=true,Kind=DateTimeKind.Local,Representation =BsonType.DateTime)]
        public DateTime CreateTime { get; set; }
    }
}
